1 REM COPYRIGHT 1981 - UNIV. OF SCRANTON - COMPUTER SCIENCE
2 REM UN-REM LINE 805 TO KEEP THE COMPUTER FROM LEARNING NEW WORDS
4 VTAB 23
5 DIM WA(8),TR(8),AB(26),LG(26),CG(9)
6 Q = 1:CP = 0:I = 0:D$ = "<CTRL-D>"
7 GOSUB 10000: HCOLOR= 3
8 INPUT "ENTER WORD SIZE (5 TO 8) ";ML: IF ML <5 OR ML >8 THEN GOTO 8
10 SCALE= 1: ROT= 0:ML = ML -1
11 IF ML = 4 THEN F$ = "LT5":BY = 15: GOTO 15
12 IF ML = 5 THEN F$ = "LT6":BY = 18: GOTO 15
13 IF ML = 6 THEN F$ = "LT7":BY = 21: GOTO 15
14 IF ML = 7 THEN F$ = "LT8":BY = 24
15 PRINT "DO YOU WISH TO PLAY AGAINST THE COMPUTER? (Y/N) ": GET A$: PRINT A$:CP = 1: IF A$ < >"Y" THEN CP = 2
17 IF CP = 1 THEN PRINT D$;"OPEN FREQS,L78": PRINT D$;"READ FREQS,R0": FOR CI = 0 TO 25: INPUT LG(CI): NEXT CI: PRINT D$;"CLOSE"
20 HGR :P1 = 0:P2 = 0:TC = -1
90 GOSUB 680
91 DRAW 26 AT 0,10: DRAW 22 AT 10,10: DRAW 11 AT 20,10: DRAW 35 AT 30,10: DRAW 15 AT 40,10: DRAW 28 AT 50,10: DRAW 2 AT 60,10
92 IF CP = 1 THEN DRAW 28 AT 269,10: DRAW 15 AT 259,10: DRAW 30 AT 249,10: DRAW 31 AT 239,10: DRAW 26 AT 229,10: DRAW 23 AT 219,10: DRAW 25 AT 209,10: DRAW 13 AT 199,10: GOTO 99
93 DRAW 3 AT 269,10: DRAW 28 AT 259,10: DRAW 15 AT 249,10: DRAW 35 AT 239,10: DRAW 11 AT 229,10: DRAW 22 AT 219,10: DRAW 26 AT 209,10
99 FOR I = 0 TO ML: HPLOT I *25,143 TO I *25 +7,143: NEXT I
100 FOR I = 11 TO 36
110 DRAW I AT (I -11) *10,159: NEXT I
112 WL = 0
113 HOME
115 GOSUB 690
124 IF CP = 1 AND Q = 1 THEN GOSUB 900: GOTO 195
128 VTAB 22: PRINT "ENTER YOUR WORD"
129 I = 0
130 GET A$:XP = 10 *( ASC(A$) - ASC("A"))
132 PRINT A$;
135 IF XP >250 THEN 130
145 POKE 6,20: POKE 7,255: CALL 768
160 WA(I) = XP/10 +11: DRAW WA(I) AT I *25,140
170 I = I +1
190 IF I < = ML THEN GOTO 130
192 PRINT
195 GOSUB 690
200 FOR I = 0 TO ML
210 TR(I) = 0
220 NEXT I
300 WG = 0:LL = ML +1: FOR I = 0 TO 25:AB(I) = 0: NEXT I
301 VTAB 21: PRINT "SELECT LETTERS USING THE KEYBOARD"
302 PRINT
305 IF CP = 1 AND Q = 2 THEN PRINT D$;"OPEN ";F$;",L";BY: PRINT D$;"READ ";F$;",R0": INPUT RN: PRINT D$;"CLOSE":CI = -1:DR = 0:RE = 0
307 IF CP = 1 AND Q = 2 THEN GOSUB 3500: GOTO 340
310 GET A$:XP = 10 *( ASC(A$) - ASC("A"))
311 PRINT A$;: IF (A$ <"A") OR (A$ >"Z") THEN 310
312 IF XP >250 THEN 310
315 IF AB(XP/10) < >0 THEN GOTO 310
340 HCOLOR= 0: DRAW 37 AT XP,159: HCOLOR= 3
350 GOSUB 600
352 IF FL = 0 THEN AB(XP/10) = 1: GOTO 355
353 AB(XP/10) = 2
355 IF LL = 0 THEN 375
360 IF WG <9 THEN GOTO 307
370 Q = 3 -Q
372 FOR I = 0 TO ML: DRAW WA(I) AT I *25,140: NEXT I
375 GOSUB 3000
380 IF Q = 2 THEN GOTO 400
390 P1 = P1 +1: HCOLOR= 0: DRAW 37 AT 30,23: HCOLOR= 3: DRAW P1 +1 AT 30,23: IF P1 = 9 THEN GOTO 2700
395 GOTO 420
400 P2 = P2 +1: HCOLOR= 0: DRAW 37 AT 239,23: HCOLOR= 3: DRAW P2 +1 AT 239,23: IF P2 = 9 THEN GOTO 2700
420 IF WG <9 THEN Q = 3 -Q
425 IF CP = 1 AND Q = 2 THEN GOTO 430
427 GOSUB 700
430 GOTO 100
600 FL = 0
605 FOR I = 0 TO ML
610 IF WA(I) < >XP/10 +11 THEN GOTO 630
620 LL = LL -1:FL = 1: POKE 6,20: POKE 7,255: CALL 768: DRAW WA(I) AT I *25,140
625 IF CP = 1 THEN DR = 1:TR(I) = XP/10 +11
630 NEXT I
640 IF FL = 1 THEN GOTO 660
650 WG = WG +1: POKE 6,100: POKE 7,255: CALL 768: GOSUB 1000
660 RETURN
680 HCOLOR= 0: DRAW 37 AT 30,23: DRAW 37 AT 239,23: HCOLOR= 3: DRAW 1 AT 30,23: DRAW 1 AT 239,23
690 HCOLOR= 0: FOR I = 0 TO ML: DRAW 37 AT I *25,140: NEXT I: HCOLOR= 3: RETURN
700 PRINT D$;"OPEN ";F$;",L";BY
710 RE = 0
720 PRINT D$;"READ ";F$;",R";RE
730 INPUT RN
740 FOR TT = 1 TO RN
750 PRINT D$;"READ ";F$;",R";TT
760 FOR T2 = 0 TO ML
770 INPUT TR(T2): IF TR(T2) < >WA(T2) THEN GOTO 800
780 NEXT T2
790 GOTO 860
800 NEXT TT
805 REM GOTO 860:REM UN REM THIS LINE IF YOU DON'T WANT THE COMPUTER TO LEARN NEW WORDS
810 RN = RN +1
820 PRINT D$;"WRITE ";F$;",R";RE
830 PRINT RN
840 PRINT D$;"WRITE ";F$;",R";RN
850 FOR TT = 0 TO ML: PRINT WA(TT): NEXT TT
860 PRINT D$;"CLOSE"
899 RETURN
900 PRINT D$;"OPEN ";F$;",L";BY
910 RE = 0
920 PRINT D$;"READ ";F$;",R";RE
930 INPUT RN
940 RE = RND(1) *(RN -1):RE = INT(RE) +1
945 GOSUB 1500
950 PRINT D$;"READ ";F$;",R";RE
960 FOR TT = 0 TO ML: INPUT WA(TT): NEXT TT
970 PRINT D$;"CLOSE"
999 RETURN
1000 POKE 232,0: POKE 233,86
1010 IF WG = 1 THEN DRAW WG AT 120,16: GOTO 1100
1020 IF WG = 2 THEN DRAW WG AT 115,39: GOTO 1100
1030 IF WG = 3 THEN DRAW WG AT 90,42: GOTO 1100
1040 IF WG = 4 THEN DRAW 4 AT 148,40: GOTO 1100
1050 IF WG = 5 THEN DRAW WG AT 113,75: GOTO 1100
1060 IF WG = 6 THEN DRAW WG AT 143,75: GOTO 1100
1070 IF WG = 7 THEN DRAW WG AT 100,112: GOTO 1100
1080 IF WG = 8 THEN DRAW WG AT 174,10: GOTO 1100
1090 IF WG = 9 THEN DRAW WG AT 102,10: POKE 6,200: POKE 7,160: CALL 768: CALL 768: POKE 6,160: POKE 7,255: CALL 768
1100 POKE 232,0: POKE 233,64
1200 RETURN
1500 IF TC = -1 THEN TC = 0:CG(TC) = RE: GOTO 2000
1510 FOR TT = 0 TO TC
1520 IF CG(TT) = RE THEN GOTO 940
1530 NEXT TT
1540 TC = TC +1:CG(TT) = RE
2000 RETURN
2700 PRINT "TO STOP-ENTER A 0"
2701 PRINT "TO RESTART WITH NEW LETTER SIZE-ENTER A 1"
2702 INPUT "TO RESTART WITH SAME SIZE-ENTER A 2 ";DR
2710 IF DR = 0 THEN GOTO 2799
2720 IF DR = 1 THEN GOTO 8
2730 GOTO 20
2799 END
3000 HCOLOR= 0
3005 FOR I1 = 85 TO 180 STEP 7
3009 POKE 6,I1: POKE 7,80: CALL 768
3010 FOR I2 = 5 TO 125 STEP 7
3020 DRAW 37 AT I1,I2
3030 NEXT I2
3040 NEXT I1
3050 HCOLOR= 3: RETURN
3500 IF CI >4 THEN GOTO 3530
3510 CI = CI +1
3520 XP = (LG(CI) -11) *10: GOTO 3680
3530 IF DR < >1 THEN GOTO 3510
3540 PRINT D$;"OPEN ";F$;",L";BY
3550 RE = RE +1:TT = -1
3560 IF RE >RN THEN GOTO 3630
3570 PRINT D$;"READ ";F$;",R";RE
3580 INPUT XP:TT = TT +1: IF AB(XP -11) = 1 OR (TR(TT) < >0 AND TR(TT) < >XP) THEN GOTO 3550
3585 IF TT <ML THEN GOTO 3580
3590 PRINT D$;"READ ";F$;",R";RE:TT = -1
3600 INPUT XP:TT = TT +1
3610 IF TR(TT) = 0 THEN XP = (XP -11) *10:RE = RE -1: GOTO 3680